<extend name="Public/base" />

<block name="body">
  <!-- 标题栏 -->
  <div class="main-title">
    <h2>拼团商品列表</h2>
  </div>
  
  <div class="cf">
    <div class="fl">
      <!-- <button class="btn ajax-post confirm" target-form="ids" url="{:U('Join/setItemStatus',array('join_id'=>$join_id,'status'=>-1))}">删 除</button>
      <button class="btn ajax-post" target-form="ids" url="{:U('Join/setItemStatus',array('join_id'=>$join_id,'status'=>1))}">上 架</button>
      <button class="btn ajax-post confirm" target-form="ids" url="{:U('Join/setItemStatus',array('join_id'=>$join_id,'status'=>0))}">下 架</button> -->
      <button class="btn J_rtn">返回</button>
      <a class="btn" href="{:U('Join/joinItem',array('type'=>'item','id'=>$join_id))}">刷 新</a>
    </div>
    <!-- 高级搜索 -->
   <form id="J_search_form" action="{:U('Join/joinItem',array('type'=>'item','id'=>$join_id))}" method="GET">
      <div class="search-form fr cf" style="margin-bottom: 10px;">
          <div class="sleft">
            <input type="text" name="keywords" class="search-input" value="{:I('get.keywords')}" placeholder="请输入商品名称或者编号"/>
            <a class="sch-btn" href="javascript:;" id="J_search"><i class="btn-search"></i></a>
          </div>
      </div>
    </form>
  </div>
  <!-- 数据列表 -->
  <div class="data-table table-striped">
    <table class="order-table status-{$vo.status}">
      <thead>
        <tr>
          <th><input class="checkbox check-all" type="checkbox"></th>
          <th>商品基本信息</th>
          <th>库存</th>
          <th>拼团人数</th>
          <th>开团价</th>
          <th>拼团价</th>
          <th width="140" class="text-center">操作</th>
        </tr>
      </thead>
      <tbody>
      <notempty name="lists">
        <volist name="lists" id="vo">
          <tr class="status_trclass_{$vo.status}">
            <td><input name="ids[]" class="ids" type="checkbox" value="{$vo['id']}"> </td>
            <td>
              <if condition="$vo.stock eq 0">
                <a href="{:U('/Item/detail?id='.$vo['id'])}" target="_blank">
              <else />
                <a href="{:U('/Join/detail?id='.$vo['id'])}" target="_blank">
              </if>
                <img src="{:get_image_thumb(get_cover($vo['images'], 'path'), 60, 60)}" title="{$vo.name}">{$vo.name}
              </a>
            </td>
            <td>{$vo.stock}件</td>
            <td>{$vo.join_num}人</td>
            <td>{$vo.first_price}元</td>
            <td>{$vo.join_price}元</td>
            <td class="text-center">
              <a href="{:U('editItem?id='.$vo['id'].'&join_id='.$join_id)}">[编辑]</a>
              <!-- <a href="{:U('setItemStatus?ids='.$vo['id'].'&status='.abs(1-$vo['status']).'&join_id='.$join_id)}" class="ajax-get">[{$vo.status_text}]</a> -->
              <!-- <a href="{:U('setItemStatus?status=-1&ids='.$vo['id'].'&join_id='.$join_id)}" class="confirm ajax-get">[删除]</a> -->
            </td>
          </tr>
        </volist>
        <else/>
        <td colspan="12" class="text-center"> aOh! 暂时还没有内容! </td>
      </notempty>
      </tbody>
    </table>

  </div>
  <div class="page">
    {$_page}
  </div>
</block>

<block name="script">
  <script type="text/javascript" charset="utf-8">
    //导航高亮
    highlight_subnav('{:U('index')}');
    $('.J_rtn').click(function(){
        window.history.go(-1);
      });
  </script>
</block>
